/*
Copyright 2005-2015 CP Fricano - All Rights Reserved

This software and source code is licensed under the Apache
License, Version 2.0. You may not use this software or source
code except in compliance with the License.  You may obtain a
copy of the License at: http://www.apache.org/licenses/LICENSE-2.0.
Use and distributed under this License is on an "as is" basis,
without expressed or implied warranties or conditions of any kind.
See the License for the specific language governing permissions and
limitations.
 */

package com.fricano.java42.swing.dings.tester;

import java.awt.Rectangle;

import com.fricano.java42.base.components.utility.impl.Utility;
import com.fricano.java42.swing.dings.apps.components.impl.J42SwingDing_ScreenWalker;
import com.fricano.java42.swing.dings.apps.components.impl.J42SwingDing_ScreenWalker.J42ScreenWalker_Manager;

public class J42SwingDing_ScreenWalkerTest01 {

    public J42SwingDing_ScreenWalkerTest01() {
    }

    public static void main(final String args[]) throws Exception {

        J42SwingDing_ScreenWalker screenWalker = new J42SwingDing_ScreenWalker() {
            @Override
            public void progress(final J42ScreenWalker_Manager manager, final double progressPercent, final Rectangle bounds) {
            }
        };

        J42ScreenWalker_Manager manager = screenWalker.getManager_ScreenWalker();

        manager.setElevationPercent(50);
        manager.setDurationMS(3000);
        manager.setImageName("images/film_640x440.png");
        manager.setImageName("images/walkingElephant.gif");
        manager.setImageSize(0, 250);
        manager.setAudioName(null);
        manager.setGifFrameDelayMS(50);
        manager.setPixelStep(300);

        screenWalker.getManager_ScreenWalker().initialize();

        screenWalker.getManager_ScreenWalker().startWalking();

        Utility.sleep(1500);

        screenWalker = new J42SwingDing_ScreenWalker() {
            @Override
            public void progress(final J42ScreenWalker_Manager manager, final double progressPercent, final Rectangle bounds) {
                System.out.println("ProgressPercent: " + progressPercent);
            }
        };
        manager = screenWalker.getManager_ScreenWalker();

        manager.setElevationPercent(43);
        manager.setDurationMS(2000);
        manager.setImageName("images/walkingElephant.gif");
        manager.setGifFrameDelayMS(100);
        manager.setImageSize(150, 0);

        screenWalker.getManager_ScreenWalker().initialize();
        screenWalker.getManager_ScreenWalker().startWalking();
    }
}
